import React, { memo } from 'react'
import { useState } from 'react'

const App = memo(() => {
  const [ message, setMessage ] = useState('Hello World')

  const changeMessage = () => {
    setMessage('你好世界')
    console.log(message);
  }

  return (
    <div>
      { message }
      <button onClick={changeMessage}>修改文本</button>
    </div>
  )
})

export default App